#ifndef DB_H
#define DB_H
#include <QObject>
#include <QMap>
#include <QCryptographicHash>
#include <QSqlDatabase>
#include <QSqlQuery>
#include <QSqlQueryModel>
#include <QSqlError>
#include <QSqlRecord>
#include <QTableWidget>

class db:public QObject
{
    Q_OBJECT
public:
    db(QObject *parent = 0, QString name = "");
    ~db();

    void dbConnection();
    bool query(QString sql);

    void init(QString name);
private:

    bool initialized;
    QSqlQuery *q;
};



#endif // DB_H
